import request from '@/utils/request.js'

export const getCartList = () => {
  return request({
    method: 'GET',
    url: '/cart/list',
  })
}

export const addCart = data => {
  return request({
    method: 'POST',
    url: '/cart/add',
    data,
  })
}

export const updateCartNumber = (id, number) => {
  return request({
    method: 'POST',
    url: '/cart/num',
    data: {
      id,
      number,
    },
  })
}
